<template>
  <view class="notice">
    <pit-search placeholder="请输入标题" :showSelect="false"></pit-search>
    <view class="notice-content">
      <view v-if="noticelist.length>0">
        <view v-for="(item,index) in noticelist" :key="index" class="notice-content-item">
          <view class="item-category">{{item.category}}</view>
          <view class="item-title">{{item.title}}</view>
          <view class="item-time">{{item.createdDate}}</view>
        </view>
      </view>
      <view v-else class="empty">暂无通知数据</view>
    </view>
  </view>
</template>

<script>
  export default{
    name:'pit-notice',
    props: {
      noticelist: {
        type: Array,
        default: () => []
      }
    },
    data(){
      return{
      }
    },
    methods:{
    }
  }
</script>

<style lang="scss" scoped>
  .notice{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    .notice-content{
      max-height: calc(100vh - 136px);
      padding: 10px 15px;
      overflow-y: auto;
      .notice-content-item{
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        padding: 10px;
        border-radius: 6px;
        background-color: white;
        .item-category{
          margin-top: 05px;
          font-size: 17px;
          font-weight: 400;
          color: rgb(52,67,100);
        }
        .item-time,
        .item-title{
          margin-top: 10px;
          font-size: 15px;
          font-weight: 320;
          color: rgb(122,137,168);
        }
      }
    }
  }
</style>
